//
//  BeeGroupListObj.m
//  FbeeAPP
//
//  Created by dev-m on 2018/3/1.
//  Copyright © 2018年 mohao. All rights reserved.
//

#import "BeeGroupListObj.h"
#import "UrlLabel.h"
#import "InviteObj.h"

@implementation BeeGroupListObj

-(void)setObjByData:(NSDictionary *)dict
{
    self.groupId = SafeGetStringValue([dict objectForKey:@"id"]);
//    self.logoUrl = @"http://pic8.nipic.com/20100716/3795628_202148981143_2.jpg";
    self.logoUrl = SafeGetStringValue([dict objectForKey:@"logoUrl"]);
    self.groupName = SafeGetStringValue([dict objectForKey:@"name"]);
    self.groupInfo = SafeGetStringValue([dict objectForKey:@"info"]);
    self.groupRewardInfo = SafeGetStringValue([dict objectForKey:@"rewardInfo"]);
    self.createTime = SafeGetStringValue([dict objectForKey:@"createTime"]);
    self.updateTime = SafeGetStringValue([dict objectForKey:@"updateTime"]);
    //用户填写的邀请码
    self.usedInvitation = SafeGetStringValue([dict objectForKey:@"usedInvitation"]);
    
    self.isJoin = SafeGetBOOLValue([dict objectForKey:@"isJoin"]);
    self.isAdmin = SafeGetBOOLValue([dict objectForKey:@"isAdmin"]);
    
    if (!self.inviteObj) {
        self.inviteObj = [[InviteObj alloc] init];
    }
    [self.inviteObj setObjByData:dict];
    
    if (![NSString isEmptyString:self.groupRewardInfo]) {
        self.isReward = YES;
    }
    
}

@end
